<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户列表</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/customer.css">
</head>
<body>
    <h3>用户列表</h3>
    <div class="message">${message}</div>
    <c:remove var="message" scope="session"/>
    <div class="wrapper">
        <div class="title">
            <span class="ordinal">序号</span>
            <span class="username">登录名称</span>
            <span class="nickname">昵称</span>
            <span class="reg-date">注册日期</span>
            <span class="operations">操作</span>
        </div>
        <c:forEach items="${customers}" var="c" varStatus="x">
        <div class="row">
            <span class="ordinal">${x.count}</span>
            <span class="username">${c.username}</span>
            <span class="nickname">${c.nickname}</span>
            <span class="reg-date">${c.registrationDate}</span>
            <span class="operations">
                <a href="${pageContext.request.contextPath}/customer/edit?id=${c.id}">编辑用户</a>
                <a href="${pageContext.request.contextPath}/customer/change?id=${c.id}">修改密码</a>
                <a href="${pageContext.request.contextPath}/customer/remove?id=${c.id}">删除用户</a>
            </span>
        </div>
        </c:forEach>
    </div>
    <div class="links">
        <a href="${pageContext.request.contextPath}/customer/add">添加新用户</a>
    </div>
</body>
</html>
